<template>
    <div class="search-page">
        <div class="body">
            <SearchBar @search="onConfirm" />
        </div>
    </div>
</template>

<script>
import SearchBar from "@/pages/search/components/searchBar/searchBar";

export default {
    components: {
        SearchBar
    },
    data() {
        return {};
    },

    methods: {
        onConfirm(res) {
            this.$router.replace({
                path: "/home/index",
                query: {
                    keyword: res.keyword
                }
            });
            console.log(res.keyword);
        }
    }
};
</script>


<style lang="less" scoped>
.search-page {
    width: 100vw;
    height: 100vh;
    background: #f2f2f2;

    .body {
        width: 100%;
    }
}
</style>